<script type="text/html" template lay-done="layui.data.sendParams(d);">
    <div class="layui-form coreshop-form layui-form-pane" lay-filter="LAY-app-CoreCmsPromotion-grantForm" id="LAY-app-CoreCmsPromotion-grantForm">
        <input type="hidden" name="id" id="id" value="{{d.params.data.model.id}}" />

        <div class="layui-form-item">
            <label for="name" class="layui-form-label">优惠券名称</label>
            <div class="layui-input-inline layui-inline-8">
                <input class="layui-input" value="{{d.params.data.model.name || '' }}" disabled="disabled" />
            </div>
        </div>

        <div class="layui-form-item">
            <label for="sort" class="layui-form-label">用户信息</label>
            <div class="layui-input-inline  layui-inline-5">
                <input type="number" min="0" max="999999" name="data" lay-verType="tips" lay-verify="required|number" class="layui-input" lay-reqText="请输入数字" />
            </div>
            <div class="layui-form-mid layui-word-aux">请输入用户手机号码或者用户序列</div>
        </div>

        <div class="layui-form-item core-hidden">
            <div class="layui-input-block">
                <div class="layui-footer">
                    <input type="button" class="layui-btn" lay-submit lay-filter="LAY-app-CoreCmsPromotion-grantForm-submit" id="LAY-app-CoreCmsPromotion-grantForm-submit" value="确认分发">
                </div>
            </div>
        </div>
    </div>
</script>
<script>
    var debug = layui.setter.debug;
    layui.data.sendParams = function (d) {
        //开启调试情况下获取接口赋值数据
        if (debug) { console.log(d.params.data); }
        layui.use(['admin', 'form', 'laydate', 'upload', 'coreHelper', 'util', 'view'],
            function () {
                var $ = layui.$
                    , form = layui.form
                    , admin = layui.admin
                    , laydate = layui.laydate
                    , upload = layui.upload
                    , util = layui.util
                    , view = layui.view
                    , coreHelper = layui.coreHelper;

                //重载form
                form.render(null, 'LAY-app-CoreCmsPromotion-grantForm');
            })
    };
</script>